package com.maxjay.system.core;

import com.maxjay.component.metadata.core.EntityContext;
import com.maxjay.system.core.spring.BeanContext;

/**
 * <pre><b><font color="blue">Application</font></b></pre>
 * 
 * <pre><b>&nbsp;--描述说明--</b></pre> <pre></pre> <pre> <b>--样例--</b> Application
 * obj = new Application(); obj.method(); </pre> JDK版本：JDK1.4
 * 
 * @author <b>Administrator</b>
 */
public class Application {
	
	private static BeanContext beanContext;
	
	private static EntityContext entityContext;

	/**
	 * 重新加载上下文
	 * 
	 * @throws Exception
	 */
	public void reload() throws Exception {
		
	}
	
	public static BeanContext getBeanContext() {
		return beanContext;
	}

	public static void setBeanContext(BeanContext beanContext) {
		Application.beanContext = beanContext;
	}
	
	public static EntityContext getEntityContext() {
		return entityContext;
	}
	
	public static void setEntityContext(EntityContext entityContext) {
		Application.entityContext = entityContext;
	}
	
	/**
	 * 销毁上下文实例
	 */
	public static void destroy() {
		entityContext.destroy();
	}
	
}
